<template>
  <div class="ai-center">
    <h2 class="page-title">AI 功能中心</h2>
    
    <el-row :gutter="20">
      <!-- 数据接入与清洗 -->
      <el-col :span="8">
        <el-card 
          class="feature-card" 
          shadow="hover"
          @click="navigateTo('/ai-center/data-management')"
        >
          <template #header>
            <div class="card-header">
              <el-icon class="feature-icon"><DataLine /></el-icon>
              <span>数据接入与清洗</span>
            </div>
          </template>
          <div class="card-content">
            管理数据源、配置字段映射、设置清洗规则
          </div>
        </el-card>
      </el-col>

      <!-- 特征工程 -->
      <el-col :span="8">
        <el-card 
          class="feature-card" 
          shadow="hover"
          @click="navigateTo('/ai-center/feature-engineering')"
        >
          <template #header>
            <div class="card-header">
              <el-icon class="feature-icon"><Setting /></el-icon>
              <span>特征工程</span>
            </div>
          </template>
          <div class="card-content">
            特征选择、特征转换、特征版本管理
          </div>
        </el-card>
      </el-col>

      <!-- 模型训练管理 -->
      <el-col :span="8">
        <el-card 
          class="feature-card" 
          shadow="hover"
          @click="navigateTo('/ai-center/model-training')"
        >
          <template #header>
            <div class="card-header">
              <el-icon class="feature-icon"><Cpu /></el-icon>
              <span>模型训练管理</span>
            </div>
          </template>
          <div class="card-content">
            模型配置、训练参数设置、训练日志查看
          </div>
        </el-card>
      </el-col>

      <!-- 模型评估与部署 -->
      <el-col :span="8">
        <el-card 
          class="feature-card" 
          shadow="hover"
          @click="navigateTo('/ai-center/model-evaluation')"
        >
          <template #header>
            <div class="card-header">
              <el-icon class="feature-icon"><TrendCharts /></el-icon>
              <span>模型评估与部署</span>
            </div>
          </template>
          <div class="card-content">
            模型对比、性能评估、一键部署
          </div>
        </el-card>
      </el-col>

      <!-- 模型推理与监控 -->
      <el-col :span="8">
        <el-card 
          class="feature-card" 
          shadow="hover"
          @click="navigateTo('/ai-center/model-monitoring')"
        >
          <template #header>
            <div class="card-header">
              <el-icon class="feature-icon"><Monitor /></el-icon>
              <span>模型推理与监控</span>
            </div>
          </template>
          <div class="card-content">
            实时预测、异常检测、资源监控
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { DataLine, Setting, Cpu, TrendCharts, Monitor } from '@element-plus/icons-vue'

const router = useRouter()

const navigateTo = (path) => {
  router.push(path)
}
</script>

<style scoped>
.ai-center {
  padding: 20px;
}

.page-title {
  text-align: center;
  margin-bottom: 30px;
  color: #303133;
}

.feature-card {
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-icon {
  font-size: 24px;
  color: #409EFF;
}

.card-content {
  color: #606266;
  line-height: 1.5;
}
</style> 